<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>产品列表</h1>
	<table border="1px">
		<tr>
			<td>产品名称</td>
			<td>产品描述</td>
			<td>产品类别</td>
			<td>状态</td>
			<td>操作</td>
		</tr>
		
		<c:forEach items="${pagebean.items }" var="item">
		<tr>
			<td>${item.productname }</td>
			<td>${item.descs }</td>
			<td>${item.cname }</td>
			<td>
				<c:if test="${item.type == 1 }" >
					可用
				</c:if>
				<c:if test="${item.type == 2 }" >
					不可用
				</c:if>
			
			</td>
			<td><a href="item/del/${item.id}">删除</a></td>
			
		</tr>
		</c:forEach>
		<tr>
			<td colspan="5"> 
				<a href="item?current=1">首页</a>
				<a href="item?current=${pagebean.current-1}">上一页</a>
				<a href="item?current=${pagebean.current+1}">下一页</a>
				<a href="item?current=${pagebean.taltal}">尾页</a>
			</td>
		</tr>
		<tr>
			<td colspan="5"> 
				<a href="manager/add">新增产品</a>
			</td>
		</tr>
	</table>
</body>
</html>